AM_CFLAGS = -fstack-protector -Wall -pedantic \
        -Wstrict-prototypes -Wundef -fno-common \
        -Werror-implicit-function-declaration \
        -Wformat -Wformat-security -Werror=format-security \
        -Wno-conversion -Wunused-variable -Wunreachable-code \
        -Wall -W -D_FORTIFY_SOURCE=2 \
        -std=c99 -Wno-error

AM_CPPFLAGS = \
	-I $(top_srcdir)/src \
	-I $(top_srcdir)/src/packaging \
	-I $(top_srcdir)/src/library \
	-I $(top_srcdir)/src/output \
	-I $(top_srcdir)/src/plugins/packaging \
	-DSITE_PATH=\"$(sysconfdir)\" \
	-DTOP_DIR=\"$(abs_top_srcdir)\" \
	-DTOP_BUILD_DIR=\"$(abs_top_builddir)\"

if INTREE
AM_CPPFLAGS += \
	-DMODULE_DIR=\"$(abs_top_srcdir)/src/.libs\" \
	-DDATA_DIRECTORY=\"$(abs_top_srcdir)/data\"
else
AM_CPPFLAGS += \
	-DMODULE_DIR=\"$(pkglibdir)\" \
	-DDATA_DIRECTORY=\"$(datadir)/cve-check-tool\"
endif

AUTOMAKE_OPTIONS = color-tests parallel-tests

MODULE_FLAGS = \
	$(AM_LDFLAGS) \
	-fvisibility=hidden \
	-module \
	-avoid-version
